package com.intre.open.gwtjpa.data.second.server.spring;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.intre.open.gwtjpa.data.second.domain.City;
import com.intre.open.gwtjpa.data.second.server.dao.DataSecondDAO;

@Transactional(value = "second", propagation = Propagation.REQUIRED)
public class DataSecondServiceSpring {
	private static final long serialVersionUID = 9066248940129914324L;
	public static final String SECOND_SERVICE_NAME = "dataSecondService";

	private DataSecondDAO dao;

	public void setDao(DataSecondDAO dao) {
		this.dao = dao;
	}

	public DataSecondDAO getDao() {
		return this.dao;
	}

	@Transactional(value = "second", propagation = Propagation.SUPPORTS)
	public List<City> loadAll() {
		return getDao().loadAll();
	}

}
